// 登录
import { findInfo,getContent,addPublic, getPrivacyApi } from "@/common/api"
export const asyncAddUser = async (dispatch,val) => {
  const RES = await findInfo(val)
  dispatch({ type: "addUser", payload: RES.data })
}
// 获取文章
export const asyncGetContent = async (dispatch, params) => {
  const RES = await getContent(params)
  dispatch({type:"getContent",payload:RES.data})
}
// 发布文章
export const asyncAddContent = async (dispatch, params) => {
  const RES = await addPublic(params)
  dispatch({type:"addContent",payload:RES.data})
}
export const asyncGetPrivacy = async (dispatch,value) => {
  const RES = await getPrivacyApi(value)
  dispatch({type:"all",payload:RES.data})
}